package com.lemon.exam.common.entity.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

/**
 * 修改用户信息传输对象
 *
 * @author Lemon
 * @since 2025/4/24 9:07
 */
public record UpdateUserDTO(
        Long id, @NotBlank(message = "姓名不能为空") String name,
        @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误") String phone,
        @NotBlank(message = "性别不能为空") String sex,
        @Email(message = "邮箱格式不正确") String email,
        @NotBlank(message = "生日不能为空") String birthday,
        String avatar,
        @NotNull(message = "请选择省份") Integer provinceId,
        @NotNull(message = "请选择城市") Integer cityId,
        @NotNull(message = "请选择县区") Integer countyId,
        @NotBlank(message = "地址不能为空") String address
) {
}
